import React, { Component } from 'react';
import {HashRouter as Router,Route,Switch} from 'react-router-dom';
import asyncComponent from "../utils/AsyncComponent";
import connectRoute from "../utils/connectRoute";


const Home = connectRoute(asyncComponent(() => import("../Component/Home")));
const Authenttication = connectRoute(asyncComponent(() => import("../Component/Authenttication")));
const OperationRecord = connectRoute(asyncComponent(() =>import("../Component/OperationRecord")));

class App extends Component{
    render() {
        return(
            <div>
               <Router>
                    <Switch>
                        <Route exact path='/' component={Home}></Route>
                        <Route  path='/auth' component={Authenttication}></Route>
                        <Route  path='/record' component={OperationRecord}></Route>
                    </Switch>
               </Router>
            </div>
        )
    }
}

export default App;